{% extends "templates/main_template.html.j2" %}



{% block title %}Логи · Farado{% endblock %}

{% set active_menu = 'logs' %}


{#----------------------------------------------------------------------------#}
{% block styles %}
{% endblock %}


{#----------------------------------------------------------------------------#}
{% block breadcrumb %}
  <ol class="breadcrumb">
    <li class="breadcrumb-item active" aria-current="page">Логи</li>
  </ol>
{% endblock %}


{#----------------------------------------------------------------------------#}
{% block content %}
  <div class="row placeholders">
    <div class="col-12">
      <textarea
        readonly
        id="log_data"
        class="form-control rounded-0 mt-4"
        rows="32"
        style="font-family:monospace;white-space: pre;overflow-wrap: normal;overflow-x: scroll;">{{ log_data }}</textarea>
    </div>
    <div class="col-12 mt-4">
      <a href="/database"
        class="btn btn-outline-secondary"
        role="button"
        aria-pressed="true"
        title="Скачать базу данных системы">
          <i class="bi bi-database-down mr-1"></i>
      </a>
    </div>
  </div>
{% endblock %}



{#----------------------------------------------------------------------------#}
{% block scripts %}
<script>
  document_ready_function = function() {
    var logs_textarea = document.getElementById('log_data');
    logs_textarea.scrollTop = logs_textarea.scrollHeight;
  }
</script>
{% endblock %}
